using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using UwinEducation.Domain.Entities;
using UwinEducation.Shared.Enums;
using UwinEducation.Shared.Models;

namespace UwinEducation.Domain.IRepositories
{
    /// <summary>
    /// 订单仓储接口
    /// </summary>
    public interface IOrderRepository : IRepository<Order, Guid>
    {
        /// <summary>
        /// 获取订单
        /// </summary>
        /// <param name="id">订单ID</param>
        /// <returns>订单实体</returns>
        Task<Order> GetByIdAsync(Guid id);

        /// <summary>
        /// 根据订单编号获取订单
        /// </summary>
        /// <param name="orderNumber">订单编号</param>
        /// <returns>订单实体</returns>
        Task<Order> GetByOrderNumberAsync(string orderNumber);

        /// <summary>
        /// 获取学生的订单列表
        /// </summary>
        /// <param name="studentId">学生ID</param>
        /// <returns>订单列表</returns>
        Task<List<Order>> GetByStudentIdAsync(Guid studentId);

        /// <summary>
        /// 根据支付状态获取订单列表
        /// </summary>
        /// <param name="paymentStatus">支付状态</param>
        /// <returns>订单列表</returns>
        Task<List<Order>> GetByPaymentStatusAsync(PaymentStatus paymentStatus);

        /// <summary>
        /// 获取订单分页列表
        /// </summary>
        /// <param name="pageRequest">分页请求参数</param>
        /// <returns>订单分页结果</returns>
        Task<PagedResult<Order>> GetPagedListAsync(OrderPageRequest pageRequest);

        /// <summary>
        /// 添加订单
        /// </summary>
        /// <param name="order">订单实体</param>
        Task AddAsync(Order order);

        /// <summary>
        /// 更新订单
        /// </summary>
        /// <param name="order">订单实体</param>
        Task UpdateAsync(Order order);

        /// <summary>
        /// 删除订单
        /// </summary>
        /// <param name="id">订单ID</param>
        //Task DeleteAsync(Guid id);

        /// <summary>
        /// 根据学生ID和学期开始时间和结束时间获取订单
        /// </summary>
        /// <param name="studentId">学生ID</param>
        /// <param name="semesterStartDate">学期开始时间</param>
        /// <param name="semesterEndDate">学期结束时间</param>
        /// <returns>订单实体</returns>
        Task<Order> GetByStudentIdAndSemesterAsync(Guid studentId, DateTime? semesterStartDate, DateTime? semesterEndDate);
    }
} 